/*
 * 菜单控制器
 */
 
Ext.define('EF.controller.MenuTree', {
    extend: 'Ext.app.Controller',
    
    views: ['MenuTree'],
    
    requires: ['EF.lib.Common'],
    
    init: function () {
        this.control({
            'menutree': { itemclick: this.onItemClick }
        });
    },
    
    onItemClick : function(view, record, item, index, e, eOpts){
    	var node = record.raw;
    	
    	if( node.target == 'GeneralGrid' )
    	{
			EF.controller.GeneralGrid.CreateGeneralGrid(node.text, node.entity);
    	}
    	else
    	{
    		
    	}
    }
});